python -m pip install -r ./requirements.txt --upgrade

pyinstaller main.py -y --clean -D -n "ympd" --specpath "./builds/linux/" --workpath "./builds/linux/build/" --distpath "./builds/linux/dist/" --icon "icon.png"

cp -rv "qt.conf" "./builds/linux/dist/ympd"

cp -rv "icon.png" "./builds/linux/dist/ympd"

cp -rv "./builds/linux/dist/ympd/PyQt5/Qt5/lib64/qt5/libexec/QtWebEngineProcess" "./builds/linux/dist/ympd"
cp -rv "./builds/linux/dist/ympd/PyQt5/Qt5/lib/qt5/libexec/QtWebEngineProcess" "./builds/linux/dist/ympd"
cp -rv "./builds/linux/dist/ympd/PyQt5/Qt5/lib/x86_64-linux-gnu/qt5/libexec/QtWebEngineProcess" "./builds/linux/dist/ympd"
cp -rv "./builds/linux/dist/ympd/PyQt5/Qt5/lib/qt/libexec/QtWebEngineProcess" "./builds/linux/dist/ympd"

cp -rv "./builds/linux/dist/ympd/PyQt5/Qt5/resources/." "./builds/linux/dist/ympd"
rm -rfv "./builds/linux/dist/ympd/PyQt5/Qt5/resources"

cp -rv "./builds/linux/dist/ympd/PyQt5/Qt5/translations/qtwebengine_locales/." "./builds/linux/dist/ympd"
rm -rfv "./builds/linux/dist/ympd/PyQt5/Qt5/translations"

echo "FINISHED"